733e0e02a357e5335577c3eb9ec40433c2c255d9,ij/plugin/SurfacePlotter.java,SurfacePlotter,drawAndLabelAxis,#ImageProcessor#ImageProcessor#Rectangle#,263

Before Change


		ip2.drawString(s, (int) p1x-18-w, (int) p1y +h/2);
		
		//x-axis
		s = (double) Math.round(roi.height*cal.pixelHeight*10)/10+" "+cal.getUnits();
		w =  ip2.getFontMetrics().stringWidth(s);
		drawAxis(ip2, (int) p1x, (int) p1y, (int) p2x, (int) p2y, s, 10, -1, 1, 1);

After Change


		
		//x-axis
		boolean unitsMatch = cal.getXUnit().equals(cal.getYUnit());
		String xunits = unitsMatch ? cal.getUnits() : cal.getYUnit(); // why swapped?
		s = (double) Math.round(roi.height*cal.pixelHeight*10)/10+" "+xunits;
		w =  ip2.getFontMetrics().stringWidth(s);
		drawAxis(ip2, (int) p1x, (int) p1y, (int) p2x, (int) p2y, s, 10, -1, 1, 1);